package com.bootcamp.javase.polymorph;

/**
 * @program: PolyMorphCode
 * @description: cast a value to a final type.
 * @author: Keyu Li
 * @create: 2021-09-02 21:00
 **/

public class FinalKeyWord {
    // final 修饰的普通成员变量 三种赋值：显式赋值，构造代码块，构造器赋值
    final int a = 0;
    {
        final int b = 1;
    }
    final int c;
    public FinalKeyWord(int c) {
        this.c = c;
    }
    // final 修饰静态成员变量赋值：显式赋值，静态代码块。
    final static int staticA = 11;
    final static int staticB;
    static {
        staticB = 22;
    }
}
